08. Quiz: Primary - Foreign Key Relationship

Helpful ERD For Answering the Below Questions

QUIZ QUESTION::

Match the appropriate definition or description to each term or column.

ANSWER CHOICES:



Definition or Column Description

Term or Column

Has a unique value for every row in that column. There is one in every table.

The link to the primary key that exists in another table.

The primary key in every table of our example database.

A foreign key that exists in both the web_events and orders tables.

The ON statement associated with a JOIN of the web_events and accounts tables.

SOLUTION:

Definition or Column Description

Term or Column

The link to the primary key that exists in another table.

A foreign key that exists in both the web_events and orders tables.

The primary key in every table of our example database.

The ON statement associated with a JOIN of the web_events and accounts tables.

Has a unique value for every row in that column. There is one in every table.

Select all that are true for primary keys.

SOLUTION:
  • There is one and only one of these columns in every table.
  • They are a column in a table.

Select all that are true of foreign keys.

SOLUTION:
  • They are always linked to a primary key.
  • In the above database, every foreign key is associated with the crow-foot notation, which suggests it can appear multiple times in the column of a table.